﻿<DemoContainer>
    <ApexChart TItem="Order"
               Title="Order Net Value" Options="options">

        <ApexPointSeries TItem="Order"
                         Items="Orders"
                         Name="Gross Value"
                         SeriesType="SeriesType.Line"
                         XValue="@(e => e.Country)"
                         YAggregate="@(e => e.Sum(e => e.GrossValue))"
                         OrderByDescending="e=>e.Y" />
    </ApexChart>
</DemoContainer>

@code {
    private List<Order> Orders { get; set; } = SampleData.GetOrders();
    private ApexChartOptions<Order> options { get; set; } = new();

    protected override void OnInitialized()
    {
        options.Chart = new Chart
            {
                Toolbar = new ApexCharts.Toolbar
                {
                    Tools = new Tools { Zoomin = false, Zoomout = false }
                }
            };
    }
}